package org.emet.flex
{
	import mx.collections.ArrayCollection;
	
	import org.emet.flex.web.dto.DataDic;
	
	/**
	 * 存储常用公用常量  方便修改, 懒得用XML了
	 * */
	public class CommonData
	{
		public static const EDU_ARRAY:Array = ["其他","初中","高中","中专","中技","大专","本科","MBA","硕士","博士"];
		/*
		public static const RELATIONSHIP_ARRAY:Array = ["子女","亲戚"];
		public static const GENDER_ARRAY:Array = [];
		// for lagcy functionality, for ex, ash storeage
		public static const SEX_ARRAY:Array = [{value:'2',name:'未知'},{value:'1',name:'男'},{value:"0",name:'女'}];
		public static const NATIONAL_ARRAY:Array = ["中国","外国"];
		public static const RACE_ARRAY:Array = ["汉族","少数民族"];
		public static const DEATH_CAUSE_ARRAY:Array = [];
		public static const DEAL_ARRAY:Array = ["自取","存放","处理"];
		public static const TOMB_FEE:String = "墓穴费";
		//{name:"全部",value:0},
		public static const CHARGE_TYPE:Array = [{name:"全部",value:0},{name:"已结算",value:2},{name:"未结算",value:1}];
		
		public static const AUTHORITIES:String = "authorities";
		public static const USER:String = "user";
		
		public static const DEFAULT_INTERVAL:int = 3; // 默认提醒天数
		
		//public static const CAR_STATUS_ARRAY:Array = [/*{key:'O', value:'空闲'}, {key:'B',value:'派出'}, {key:'U',value:'不在'},{key:'R', value:'已预定'}*///];
		//public static const TITLE_ARRAY:Array = [/*{key:'DRIVER', value:'司机'},{key:'GATHER', value:'收敛人'}*/];
		
		//public static const STUFF_STATUS_ARRAY:Array = [];
		
		public static var dataDictList:ArrayCollection = null;
		public static function loadDataItems(id:String):ArrayCollection {
			if(dataDictList != null) {
				for each(var dic:DataDic in dataDictList) {
					if(dic.id == id) {
						return dic.items;
					}
				}
			}
			return null;
		}
	}
}